FROM node:21.7.3-slim

# 设置代理环境变量
# ENV http_proxy=http://proxy.lh.petrochina:8080
# ENV https_proxy=http://proxy.lh.petrochina:8080
# ENV HTTP_PROXY=http://proxy.lh.petrochina:8080
# ENV HTTPS_PROXY=http://proxy.lh.petrochina:8080

# 设置npm镜像为阿里源
RUN npm config set registry https://registry.npmmirror.com

# 设置工作目录
WORKDIR /workspace

# 复制 package.json 和 pnpm-lock.yaml
# COPY package.json pnpm-lock.yaml ./

# 复制所有源代码
COPY . .

# 安装 pnpm
RUN npm install -g pnpm

# 安装项目依赖
RUN pnpm install








